<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>订单分类列表</title>
		<meta name="keywords" content="" />
		<meta name="description" content="" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<% include("/admin/resource/common_css.html"){} %>
		<script language="javascript">   
		//登录按钮提交check
		function submit_login(){
			var flag=true;
			var p_cu_loginUserName = $("#loginUserName").val();
			var p_xu_loginpasswd = $("#loginPassword").val();
			
			if(!p_cu_loginUserName){
				$("#loginUserName").addClass("form_input_error");
				$("#loginUsernameErr").html("<font color='red'>用户名不能为空</font>");
				flag=false;
			}
			if(!p_xu_loginpasswd){
				$("#loginPassword").addClass("form_input_error");
				$("#loginPasswordErr").html("<font color='red'>密码不能为空</font>");
				flag=false;
			}
			

			if(flag){
				if(p_cu_loginid_out() && p_xu_loginPasswd_out() ){
					$("#loginsubmit").html("提交登录中。。。");

					$("#loginform").submit();
					return;
				}
			}
			return flag;
		}
		//手机登陆
		function iphone_out(){
			var userName = $("#loginUserName").val();
			if(!userName){
				$("#loginUsernameErr").html("");
				return false;
			} 
		    var url="${ctx!}/admin/shop/login/checkTelphone?userName="+userName;
		    alert(url);
		    $.ajax({  
		        async : false,  
		        cache:false,  
		        type: 'POST',  
		        url: url,//请求的action路径  
		        error: function () {//请求失败处理函数  
		            alert('请求失败');  
		        },  
		        success:function(result){ //请求成功后处理函数。    
			        alert(result);
		         if(result==='false'){
		 			$("#loginUsernameErr").html("<font color='red'>手机号已存在，请重新输入</font>");
		 			return false;
		 		}else{
					$("#loginUserName").addClass("form_input_error");
					$("#loginUsernameErr").html("<font color='blue'>手机号输入正确</font>");
					return true;
				}
		     }
		  }
		);

		}
		</script>
	</head>
	<body>
		<% include("/admin/common/header.html"){} %>
		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try{ace.settings.check('main-container' , 'fixed')}catch(e){}
			</script>
			<div class="main-container-inner">
			  <% include("/admin/common/menu.html",{currentstr:"商品"}){} %>
				<div class="main-content">
				   <% include("/admin/common/breadcrumb.html",{breadaddfirst:"订单管理",breadaddsecond:"订单信息管理",breadaddthird:"买家管理信息列表"}){} %>
					<div class="page-content" id="content">
					<form method="post"  id="loginform" action="${ctx!}/admin/shop/login/loginUser"  onsubmit="return submit_login()">
			         <table>
			         <tr>
			         
			         <td>
 						<span>手机号：</span><input type="text" class="" name="userName" id="loginUserName"  value="" onblur="iphone_out()"><span id="loginUsernameErr">${msg!}</span><br/>
 						<span>密码：</span><input type="password" class="" name="password" id="loginPassword"  value="" onblur="p_cu_loginid_out()"><br/>
 					</td>
 					</tr>
 					<tr>
 					<td>
 						<input id="loginsubmit" class="" type="submit" value="登录" />
 						<input class="" type="button" value="立即申请注册"  onclick="document.location.href='${ctx!}/admin/shop/login/regindex'"/>
 					</td>
 						</tr>
					   </table>
					   </form>
				      <div id="chnllist" style="margin-top: 40px;">
						<table class="table table-striped table-bordered table-hover">

						</table>
						</div>
						<div id="bottomdiv">
				       		
					    </div>
				 </div><!-- /.page-content -->
				</div><!-- /.main-content -->
				<% include("/admin/common/acesetting.html"){}%>
			</div><!-- /.main-container-inner -->
		</div><!-- /.main-container -->
	<% include("/admin/common/footer.html"){} %>
	<% include("/admin/resource/common_js.html"){} %>
    <script type="text/javascript" src="${ctx!}/plugin/zTree/js/TreeGrid.js"></script>  
    <script type="text/javascript" src="${ctx!}/plugin/zTree/js/jquery.ztree.core-3.5.js"></script>   
     <script type="text/javascript" src="${ctx!}/js/admin/category.js"></script>   
	</body>
</html>
